import { TaskBase } from '../TaskBase';

export class TaskPickup extends TaskBase {
    shouldRun(creep: Creep) {
        return !!this.target && creep.store.getFreeCapacity() > 0;
    }
    _run(creep: Creep) {
        const d = this.taskData;
        const target = <Resource>this.target;
        return this.defaultProcess(creep.pickup(target));
    }
}